#pragma once

#define SERIALIZE_MODE_DICTIONARY		1
#define SERIALIZE_MODE_PROTOBUF			2
#define SERIALIZE_MODE_FLATBUFFERS		3

#define INVOKE_RESCODE_OK				1
#define INVOKE_RESCODE_TIMEOUT			2
#define INVOKE_RESCODE_FAILED			3

#define LEVEL_EXCHANGE_HIGH				1
#define LEVEL_EXCHANGE_GENERAL			2
#define LEVEL_EXCHANGE_LOW				3


#define SID_FileTransfer        "SID_FileTransfer"
#define IID_FileTransfer		"IID_FileTransfer"

struct IFileTransferNotify
{
public:
	virtual int _cdecl OnFileRecv(
		char* serviceName,
		IDictionary* context) = 0;
};

struct IFileTransfer : public IService
{
public:
	virtual int _cdecl TransferFile(
		char* filePath,
		char* serviceName,
		IDictionary* context, 
		int timeout = -1,
		int proiLevel = LEVEL_EXCHANGE_GENERAL) = 0;

	virtual int _cdecl RegisterFileTransferHandler(
		char* serviceName,
		char* recvPath,
		IFileTransferNotify* pNotify) = 0;

	virtual int _cdecl UnRegisterFileTransferHandler(
		char* serviceName,
		IFileTransferNotify* pNotify) = 0;		
};
